/*
 * 
 *  This file is part of Sourceprojects.org Lycia Copyright 2010 noctarius
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 * 
 */
package org.sourceprojects.lycia.annotations;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * Defines a XPath expression for being using in Lycia.
 * 
 * @author noctarius
 * @since 1.9.1
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target( {})
public @interface XPath {
	/**
	 * No XPath value is being defined of expression equals this NULL value
	 */
	public static final String NULL = "~~NULL~~";

	/**
	 * Returns the expression defined in this XPath annotation. Returned value
	 * equals {@link XPath.NULL} if no XPath expression is defined.
	 * 
	 * @return defined expression
	 */
	String expression();

	/**
	 * Returns an array of {@link Namespace}s to be used in this XPath
	 * expression
	 * 
	 * @return an array of Namespaces
	 */
	Namespace[] namespaces() default {};
}
